package com.apimarket.entity.kong;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Date;
import java.util.List;

public class Service {
    private String id;

    @JsonProperty("created_at")
    private Date createdAt;

    @JsonProperty("updated_at")
    private Date updatedAt;

    private String name;

    private Integer retries;

    private String protocol;

    private String host;

    private Integer port;

    private String path;

    @JsonProperty("connect_timeout")
    private Integer connectTimeout;

    @JsonProperty("write_timeout")
    private Integer writeTimeout;

    @JsonProperty("read_timeout")
    private Integer readTimeout;

    private List<String> tags;

    @JsonProperty("client_certificate")
    private ClientCertificate clientCertificate;

    @JsonProperty("tls_verify")
    private Boolean tlsVerify;

    @JsonProperty("tls_verify_depth")
    private Integer tlsVerifyDepth;

    @JsonProperty("ca_certificates")
    private List<String> caCertificates;

    @JsonProperty("ws_id")
    private String wsId;

    public class ClientCertificate {
        private String id;

        public ClientCertificate(String id) {
            this.id = id;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        @Override
        public String toString() {
            final StringBuilder sb = new StringBuilder("ClientCertificate{");
            sb.append("id='").append(id).append('\'');
            sb.append('}');
            return sb.toString();
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getRetries() {
        return retries;
    }

    public void setRetries(int retries) {
        this.retries = retries;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Integer getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public Integer getWriteTimeout() {
        return writeTimeout;
    }

    public void setWriteTimeout(int writeTimeout) {
        this.writeTimeout = writeTimeout;
    }

    public Integer getReadTimeout() {
        return readTimeout;
    }

    public void setReadTimeout(int readTimeout) {
        this.readTimeout = readTimeout;
    }

    public List<String> getTags() {
        return tags;
    }

    public void setTags(List<String> tags) {
        this.tags = tags;
    }

    public ClientCertificate getClientCertificate() {
        return clientCertificate;
    }

    public void setClientCertificate(ClientCertificate clientCertificate) {
        this.clientCertificate = clientCertificate;
    }

    public Boolean isTlsVerify() {
        return tlsVerify;
    }

    public void setTlsVerify(boolean tlsVerify) {
        this.tlsVerify = tlsVerify;
    }

    public Integer getTlsVerifyDepth() {
        return tlsVerifyDepth;
    }

    public void setTlsVerifyDepth(int tlsVerifyDepth) {
        this.tlsVerifyDepth = tlsVerifyDepth;
    }

    public List<String> getCaCertificates() {
        return caCertificates;
    }

    public void setCaCertificates(List<String> caCertificates) {
        this.caCertificates = caCertificates;
    }

    public String getWsId() {
        return wsId;
    }

    public void setWsId(String wsId) {
        this.wsId = wsId;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Service{");
        sb.append("id='").append(id).append('\'');
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", name='").append(name).append('\'');
        sb.append(", retries=").append(retries);
        sb.append(", protocol='").append(protocol).append('\'');
        sb.append(", host='").append(host).append('\'');
        sb.append(", port=").append(port);
        sb.append(", path='").append(path).append('\'');
        sb.append(", connectTimeout=").append(connectTimeout);
        sb.append(", writeTimeout=").append(writeTimeout);
        sb.append(", readTimeout=").append(readTimeout);
        sb.append(", tags='").append(tags).append('\'');
        sb.append(", clientCertificateId='").append(clientCertificate).append('\'');
        sb.append(", tlsVerify=").append(tlsVerify);
        sb.append(", tlsVerifyDepth=").append(tlsVerifyDepth);
        sb.append(", caCertificates='").append(caCertificates).append('\'');
        sb.append(", wsId='").append(wsId).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
